/**
 * 页面头部样式
 */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 2rem;
  background-color: var(--color-background-primary);
  border-bottom: 1px solid var(--color-gray-200);
  
  .page-title {
    font-size: 1.5rem;
    font-weight: 700;
  }
  
  .header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
  }
}

// 搜索框
.search-box {
  position: relative;
  width: 300px;
  
  input {
    width: 100%;
    padding: 0.5rem 1rem;
    padding-right: 2.5rem;
    border: 1px solid var(--color-gray-300);
    border-radius: 0.25rem;
    font-size: 0.875rem;
  }
  
  button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-gray-500);
  }
}

// 通知
.notifications {
  position: relative;
  
  button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-gray-700);
  }
  
  .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--color-accent);
    color: white;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

// 用户菜单
.user-menu {
  position: relative;
  
  button {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
  }
  
  .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-weight: 600;
  }
  
  .user-name {
    margin-right: 0.5rem;
    font-weight: 500;
  }
  
  .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background-color: var(--color-background-primary);
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    display: none;
    z-index: 1000;
    
    &.show {
      display: block;
    }
    
    a {
      display: flex;
      align-items: center;
      padding: 0.75rem 1rem;
      color: var(--color-text-secondary);
      
      &:hover {
        background-color: var(--color-gray-100);
      }
      
      [data-icon] {
        margin-right: 0.75rem;
      }
    }
    
    hr {
      margin: 0.5rem 0;
      border: none;
      border-top: 1px solid var(--color-gray-200);
    }
  }
}

// 响应式调整
@media (max-width: 768px) {
  .header {
    padding: 0 1rem;
  }
  
  .search-box {
    width: 200px;
  }
}

@media (max-width: 576px) {
  .search-box {
    display: none;
  }
} 